package com.evon.yardmanagement.model;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Model class for representing state.
 * 
 * @author vgaurav
 * 
 */
@Entity
@Table(name = "STATE")
@AttributeOverride(name = "id", column = @Column(name = "STATE_ID"))
public class State extends BaseModel implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name = "STATE_NAME")
	private String stateName;
	@Column(name = "STATE_CODE")
	private String stateCode;
	
	@ManyToOne
	@JoinColumn(name="COUNTRY_ID")
	private Country country;

	public String getStateName() {
		return stateName;
	}

	public String getStateCode() {
		return stateCode;
	}

	public void setStateName(String stateName) {
		this.stateName = stateName;
	}

	public void setStateCode(String stateCode) {
		this.stateCode = stateCode;
	}

	public Country getCountry() {
		return country;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

}
